]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix positioning of panel on startup
authorAlexander Larsson <alexl@redhat.com>
Thu, 24 Feb 2011 10:21:30 +0000 (11:21 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 3 Mar 2011 14:56:00 +0000 (15:56 +0100)
We need to do the initial relayout before we start up the startup
animation, and the startup animation can't hardcode the position
of the panel to zero.

https://bugzilla.gnome.org/show_bug.cgi?id=642881

js/ui/main.js
js/ui/panel.js

index a798414543d0e15f18c6cbdfa316af1492359434..3d3d87c1491dfdbf2a20edab4749da627898776d 100644 (file)
@@ -196,6 +196,9 @@ function start() {
     ExtensionSystem.init();
     ExtensionSystem.loadExtensions();
 
+    // Perform initial relayout here
+    _relayout();
+
     panel.startStatusArea();
     panel.startupAnimation();
 
@@ -204,9 +207,6 @@ function start() {
 
     global.stage.connect('captured-event', _globalKeyPressHandler);
 
-    // Perform initial relayout here
-    _relayout();
-
     _log('info', 'loaded at ' + _startDate);
     log('GNOME Shell started at ' + _startDate);
 
index 92272df98b85a81ebfc9069719b637621ca842a5..1d1e10d6038b7fcbabfc8289d0fc9a91e85ca8bc 100644 (file)
@@ -1042,9 +1042,10 @@ Panel.prototype = {
     },
 
     startupAnimation: function() {
-        this.actor.y = -this.actor.height;
+        let oldY = this.actor.y;
+        this.actor.y = oldY - this.actor.height;
         Tweener.addTween(this.actor,
-                         { y: 0,
+                         { y: oldY,
                            time: 0.2,
                            transition: 'easeOutQuad'
                          });